<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>财务管理</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  <link rel="stylesheet" href="/usercp/layui/css/layui.css" media="all">
  <link rel="stylesheet" href="/usercp/style/admin.css" media="all">
</head>
<body>

  <div class="m-site-framebody">
    <div class="layui-card">
      <div class="layui-form layui-card-header layuiadmin-card-header-auto">
        <div class="layui-form-item">
          <div class="layui-inline">
            <label class="layui-form-label">客户</label>
            <div class="layui-input-block">
              <select name="current_id">
                  <option value="-1">全部</option>
                  <?php foreach($customs as $k => $v): ?>
                    <option value="{$v['current_id']}">{$v['nickname']}</option>
                  <?php endforeach;?>
              </select>
            </div>
          </div>

          <!--<div class="layui-inline">-->
            <!--<label class="layui-form-label">客户昵称/</label>-->
            <!--<div class="layui-input-block">-->
              <!--<input type="text" name="title" placeholder="请输入标题/内容" autocomplete="off" class="layui-input">-->
            <!--</div>-->
          <!--</div>-->

          <div class="layui-inline">
            <button class="layui-btn layuiadmin-btn-useradmin" lay-submit lay-filter="LAY-user-front-search">
              <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
            </button>
          </div>
        </div>
      </div>

      <div class="layui-card-body">
        <table id="LAY-article-manage" lay-filter="LAY-article-manage"></table>
        <script type="text/html" id="imgTpl">
          <img style="display: inline-block; width: 50%; height: 100%;" src= {{ d.avatar }}>
        </script>
      </div>
    </div>
  </div>

  <script src="/usercp/layui/layui.js"></script>  
  <script>
  layui.config({
    base: '/usercp/' //静态资源所在路径
  }).extend({
    index: 'lib/index' //主入口模块
  }).use(['index', 'finance/index'], function(){ //此处的custom/custom是指public/usercp/modules/custom/custom.js
    var $ = layui.$
    ,form = layui.form
    ,table = layui.table;

    //监听搜索
    form.on('submit(LAY-user-front-search)', function(data){
      var field = data.field;
      //执行重载
      table.reload('LAY-article-manage', {
        where: field
      });
    });


    $('.layui-btn.layuiadmin-btn-useradmin').on('click', function(){
      var type = $(this).data('type');
      // active[type] ? active[type].call(this) : '';
    });
  });
  </script>
</body>
</html>
